home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
dev_libs
/
feelin040718
/
arexx
/
f_phx.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2004-08-03
|
1KB
|
52 lines
/*
F_Phx.rexx
*/
SIGNAL ON FAILURE
IF ~Show('L','rexxsupport.library') THEN DO
IF ~AddLib('rexxsupport.library',0,-30) THEN DO
Say('Unable to open rexxsupport.library')
EXIT 10
END
END
PARSE ARG src force quiet .
IF Exists(src) THEN DO
date = Translate(Date(E),'-','/')
time = Time()
obj = Left(src,Length(src) - 1) || 'o'
IF force = 1 THEN DO
update = 1
END
ELSE DO
state_src = StateF(src)
state_obj = StateF(obj)
update = 0
IF Word(state_src,5) ~= Word(state_obj,5) THEN update = 1
IF Word(state_src,6) ~= Word(state_obj,6) THEN update = 1
IF Word(state_src,7) ~= Word(state_obj,7) THEN update = 1
END
IF quiet = 0 THEN DO
IF update = 1 THEN Say('
Updating
' || src || '...')
ELSE Say(src || '
ok
')
END
IF update THEN DO
ADDRESS COMMAND 'PhxAss QUIET' src
ADDRESS COMMAND 'SetDate FILE' src 'DATE' date 'TIME' time
ADDRESS COMMAND 'SetDate FILE' obj 'DATE' date 'TIME' time
END
END
ELSE DO
Say('File "' || src || '" does not exists')
END